import React, { useCallback, useMemo, useRef } from "react";
import { View, Text, StyleSheet, Button, TouchableOpacity } from "react-native";
import { BottomSheetModal, BottomSheetModalProvider } from "@gorhom/bottom-sheet";
import { useColorScheme } from "react-native";
import { Link } from "expo-router";

const Home = () => {
    // ref
    const bottomSheetModalRef = useRef<BottomSheetModal>(null);

    // variables
    const snapPoints = useMemo(() => ["25%", "50%"], []);

    // callbacks
    const handlePresentModalPress = useCallback(() => {
        bottomSheetModalRef.current?.present();
    }, []);
    const handleSheetChanges = useCallback((index: number) => {}, []);

    const colorScheme = useColorScheme();

    // renders
    return (
        <View>
            <Text>部署我的热更新</Text>
            <Text>部署我的热更新</Text>
            <Text>222222222222</Text>
            <Text>部署我的热更新</Text>
            <Text>33333333333</Text>
            <Text>部署我的热更新</Text>
            <Text>部署我的热更新</Text>

            <Link href={"/modals/booking"} asChild>
                <TouchableOpacity>
                    <Text>显示表示成功~~~</Text>
                </TouchableOpacity>
            </Link>
        </View>
    );
};

const styles = StyleSheet.create({
    container: {
        flex: 1,
        padding: 24,
        justifyContent: "center",
        backgroundColor: "grey",
    },
    contentContainer: {
        flex: 1,
        alignItems: "center",
    },
});

export default Home;
